package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_Table(name = "t_refund", simpleName = "", engine = MysqlDriver.InnoDB, comment = "支付退款")
public class _DDL_Refund {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "原交易id")
    private java.math.BigInteger id;

    @_DDL_Column(name = "ag_id", type = SqlType.INT_UNSIGNED, comment = "渠道上id")
    private Long agId;

    @_DDL_Column(name = "amt", type = SqlType.DECIMAL, size = 8, scale = 2, nullable = false, comment = "交易金额(元）")
    private java.math.BigDecimal amt;

    @_DDL_Unique(name = "UNI_T_REFUND_ORD_ID")
    @_DDL_Column(name = "ord_id", type = SqlType.BIGINT_UNSIGNED, comment = "原来交易")
    private java.math.BigInteger ordId;

    @_DDL_Index(name = "IDX_t_refund_dev_id")
    @_DDL_Column(name = "dev_id", type = SqlType.INT_UNSIGNED, comment = "设备id")
    private Long devId;

    @_DDL_Index(name = "IDX_t_refund_mer_id")
    @_DDL_Column(name = "mer_id", type = SqlType.BIGINT_UNSIGNED, comment = "商户id")
    private java.math.BigInteger merId;

    @_DDL_Column(name = "date", type = SqlType.INT_UNSIGNED, comment = "日期")
    private Long date;

    @_DDL_Column(name = "state", type = SqlType.TINYINT_UNSIGNED, comment = "状态")
    private Integer state;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "第三方类型")
    private Integer chType;

    @_DDL_Column(name = "ch_id", type = SqlType.VARCHAR, size = 30, comment = "第三方退款id")
    private String chId;

    @_DDL_Column(name = "ch_time", type = SqlType.TIMESTAMP, comment = "第三方交易时间")
    private java.sql.Timestamp chTime;

    @_DDL_Column(name = "err_msg", type = SqlType.VARCHAR, size = 100, comment = "错误信息")
    private String errMsg;

    @_DDL_Column(name = "err_code", type = SqlType.VARCHAR, size = 20, comment = "错误代码")
    private String errCode;

    @_DDL_Column(name = "plat_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "平台金额")
    private java.math.BigDecimal platAmt;

    @_DDL_Column(name = "ag_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "渠道商金额")
    private java.math.BigDecimal agAmt;

    @_DDL_Column(name = "mer_amt", type = SqlType.DECIMAL, size = 10, scale = 2, comment = "商户金额")
    private java.math.BigDecimal merAmt;

}
